/* 响应式布局优化 */

/* 平板端 (768px - 1024px) */
@media (max-width: 1024px) {
  .dynasty-header {
    padding: 24px !important;

    .dynasty-seal .seal-placeholder {
      width: 80px !important;
      height: 80px !important;
    }

    .dynasty-info h1 {
      font-size: 24px !important;
    }
  }

  .graph-container {
    height: 600px !important;
  }
}

/* 移动端 (< 768px) */
@media (max-width: 768px) {
  /* 隐藏侧边栏 */
  .sider {
    display: none !important;
  }

  /* 头部调整 */
  .header {
    padding: 0 12px !important;
  }

  .logo h1 {
    font-size: 14px !important;
  }

  .header-actions {
    .global-search {
      display: none !important;
    }
  }

  /* 朝代头部 */
  .dynasty-header {
    flex-direction: column !important;
    padding: 16px !important;
    text-align: center;

    .dynasty-seal {
      margin-bottom: 16px;
    }

    .dynasty-info h1 {
      font-size: 20px !important;
    }

    .dynasty-stats {
      :deep(.ant-space) {
        flex-direction: column !important;
      }
    }
  }

  /* 统计卡片 */
  .stat-card {
    margin-bottom: 12px !important;
  }

  /* G6图谱 */
  .graph-container {
    height: 400px !important;
  }

  /* 藩国地图 */
  .map-container {
    height: 200px !important;
    padding: 12px !important;
  }

  /* 卡片网格 */
  .ant-col-8,
  .ant-col-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* 纪念堂卡片 */
  .ancestor-card .ancestor-photo img {
    height: 150px !important;
  }

  /* 名人墙 */
  .honor-card {
    height: 200px !important;
  }

  /* 课程卡片 */
  .course-card {
    margin-bottom: 12px !important;
  }
}

/* 小屏幕 (< 480px) */
@media (max-width: 480px) {
  .content {
    padding: 12px !important;
  }

  .dynasty-header {
    .dynasty-info h1 {
      font-size: 18px !important;
    }

    .dynasty-motto {
      font-size: 12px !important;
    }
  }

  .page-header {
    flex-direction: column !important;
    gap: 12px;

    .header-actions {
      width: 100%;

      button {
        width: 100%;
      }
    }
  }
}

/* 底部导航栏（移动端） */
@media (max-width: 768px) {
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    background: white;
    border-top: 1px solid #f0f0f0;

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      font-size: 12px;
      color: #666;
      cursor: pointer;

      &.active {
        color: #1890ff;
      }

      .nav-icon {
        margin-bottom: 4px;
        font-size: 20px;
      }
    }
  }

  .content {
    padding-bottom: 60px !important; /* 为底部导航留空间 */
  }
}
